<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:46:"D:\web\quan/app/index\view\member\renzhen.html";i:1537432626;s:45:"D:\web\quan/app/index\view\public\footer.html";i:1537432627;}*/ ?>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>实名认证</title>
		<script src="__INDEX__/js/mui.min.js"></script>
		<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="__INDEX__/css/iconfont.css" />
		<link rel="stylesheet" href="__INDEX__/css/style.css" />
		<link rel="stylesheet" href="__INDEX__/css/mall.css" />
		<style type="text/css">
			#sfz_pic {
				position: relative;
			}
			/*opacity: 0;*/
			
			.upload,
			.upload1 {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				opacity: 0;
			}
			
			#dp_pic {
				position: relative;
			}
			
			.upload2 {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				opacity: 0;
			}
			
			#yyzz_pic {
				position: relative;
			}
			
			.upload3 {
				position: absolute;
				top: 5%;
				left: 6%;
				height: 100%;
				width: 100%;
				opacity: 0;
			}
			
			#qt_pic {
				position: relative;
			}
			
			.upload4 {
				position: absolute;
				top: 5%;
				left: 6%;
				height: 100%;
				width: 100%;
				opacity: 0;
			}
			
			.renz_box {
				width: 94%;
				margin-top: 10px;
			}
			
			.renz_box li {
				background: #fff7f1;
				border: 1px solid #FE9956;
				border-radius: 10px;
				color: #666666;
			}
			
			.sqrz_bt {
				font-size: 14px;
				font-weight: bold;
				text-align: center;
				padding-top: 20px;
				color: #666666;
			}
			
			.gerenzl_nr .tip {
				color: #FF0000;
				font-size: 12px;
			}
			
			.gerzl_btn a {
			    background: #3ab246;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left" href="JavaScript:history.go(-1)"></a>
			<h1 class="mui-title">实名认证 </h1>
		</header>
		<div class="mui-content " style="padding-bottom: 0;background: #fff;">
			<canvas width="500" height="800" id="canvas" style="display: none;"></canvas>
			<div class="gerenzl_nr">
				<form id='my_form' class="layui-form update_form" action="" method="post">
					<?php if($info_user['is_verify'] == 3): ?>
						<div class="mui-input-row ">
							<span style="margin-left: 15%;font-weight: bold;color: red;">驳回原因:<?php echo $verif_info['reason']; ?></span>
						</div>
					<?php endif; ?>
					<div class="mui-input-row ">
						<label><em>*</em>姓名</label>
						<input type="text" id="rel_name" name="user_name" value="<?php echo $verif_info['user_name']; ?>" autocomplete="off" lay-verify="required" class="layui-input" placeholder="请输入用户的真实姓名">
					</div>
					<div class="mui-input-row">
						<label><em>*</em>手机号码</label>
						<input type="text" id="mobile" name="mobile" value="<?php echo $info_user['mobile']; ?>" lay-verify="required" class="layui-input" placeholder="请输入手机号码">
					</div>
					<div class="mui-input-row">
						<label><em>*</em>身份证号码</label>
						<input type="text" id="idcard" name="id_number" value="<?php echo $verif_info['id_number']; ?>" lay-verify="required" class="layui-input" placeholder="请输入身份证号码">
					</div>
					<div class="mui-input-row">
						<p class="tip">注：请确认您的身份证号码填写无误，该身份证号必须与您上传的身份证照片一致</p>
					</div>
					<div class="mui-input-row">
						<label><em>*</em>开户行及支行</label>
						<input type="text" id="bank_account" name="bank_name" value="<?php echo $verif_info['bank_name']; ?>" lay-verify="required" class="layui-input" placeholder="请输入开户行及分行">
					</div>
					<div class="mui-input-row">
						<label><em>*</em>卡号</label>
						<input type="text" id="card_no" name="bank_no" value="<?php echo $verif_info['bank_no']; ?>" lay-verify="required" class="layui-input" placeholder="请输入卡号">
					</div>
					<div class="mui-input-row">
						<label><em>*</em>开户名</label>
						<input type="text" id="bank_username" name="user_name" value="<?php echo $verif_info['user_name']; ?>" lay-verify="required" class="layui-input" placeholder="请输入开户人姓名" readonly="readonly">
					</div>
					<div class="mui-input-row">
						<label><em>*</em>银行手机号码</label>
						<input type="text" id="bank_mobile" name="reserve_mobile" value="<?php echo $verif_info['reserve_mobile']; ?>" lay-verify="required" class="layui-input" placeholder="请输入预留手机号码">
					</div>
					<div class="sqrz_bt">您的图片仅用于审核，我们将为您严格保密</div>
					<ul class="renz_box clearfix">
						<li>
							<div class="renz_img" id="yyzz_pic">
								<input type="hidden" name="id_card_front" value="<?php echo $verif_info['id_card_front']; ?>" lay-verify="required" id="thumb_1" />
								<input type="file" id="upload_1" class="upload1" value="选择图片文件" multiple />
								<span><img class='img_1' id='img_1' src="<?php if(strlen($verif_info['id_card_front']) >2): ?> <?php echo $verif_info['id_card_front']; else: ?> __INDEX__/images/renz.jpg <?php endif; ?>"></span>
							</div>
							<div>上传身份证正面照片</div>
						</li>
						<li>
							<div class="renz_img " id="yyzz_pic">
								<input type="hidden" name="id_card_behind" value="<?php echo $verif_info['id_card_behind']; ?>" lay-verify="required" id="thumb_2" />
								<input type="file" id="upload_2" class="upload1" value="选择图片文件" multiple />
								<span><img class='img_2' id='img_2' src="<?php if(strlen($verif_info['id_card_behind']) >2): ?> <?php echo $verif_info['id_card_behind']; else: ?> __INDEX__/images/renz2.jpg <?php endif; ?>"></span>
							</div>
							<div>上传身份证反面照片</div>
						</li>
						<li>
							<div class="renz_img " id="yyzz_pic">
								<input type="hidden" name="half_photo" value="<?php echo $verif_info['half_photo']; ?>" lay-verify="required" id="thumb_3" />
								<input type="file" id="upload_3" class="upload1" value="选择图片文件" multiple />
								<span><img class='img_3' id='img_3' src="<?php if(strlen($verif_info['half_photo']) >2): ?> <?php echo $verif_info['half_photo']; else: ?> __INDEX__/images/renz3.jpg <?php endif; ?>"></span>
							</div>
							<div>上传个人半身照片</div>
						</li>
						<li>
							<div class="renz_img " id="yyzz_pic">
								<input type="hidden" name="bank_card_front" value="<?php echo $verif_info['bank_card_front']; ?>" lay-verify="required" id="thumb_4" />
								<input type="file" id="upload_4" class="upload1" value="选择图片文件" multiple />
								<span><img class='img_4' id='img_4' src="<?php if(strlen($verif_info['bank_card_front']) >2): ?> <?php echo $verif_info['bank_card_front']; else: ?> __INDEX__/images/renz4.jpg <?php endif; ?>"></span>
							</div>
							<div>上传银行卡正面照片</div>
						</li>
					</ul>
					<?php if($info_user['is_verify']==0 || $info_user['is_verify']==3): ?>
						<button type="button" class="gerzl_btn gerzl_btn2" id="btn" lay-submit  lay-filter="submit_form">
							<a style="color: #fff;">提交申请</a>
						</button> 
					<?php elseif($info_user['is_verify']==2): ?>
						<button type="button" class="gerzl_btn gerzl_btn2 layui-btn layui-btn-disabled" id="btn" style="padding: 0 0;">
							<a style="color: #fff;">审核中....</a>
						</button> 
					<?php endif; ?>
				</form>

				<div class="gerzl_btn" id="sh_status" style="display: none; color: #f1ecec;font-size: 16px;font-weight: bold;"></div>
			</div>
		</div>

	</body>

</html>
<script src="__PUBLIC__/static/js/jquery.min.js"></script>
<link rel="stylesheet" href="__PUBLIC__/static/layui/css/layui.css">
<script src="__PUBLIC__/static/layui/layui.all.js"></script>
<script>
var index = layer.load(1, {shade: false,time: 1.5 * 1000});
$(".layui-layer-loading").css("left", "50%");
</script>
<script>
	//提交表单
	function set_content() {
		var mobile = $('#mobile').val();
		var bank_mobile = $('#bank_mobile').val();
		var reg = /^1[3|4|5|6|7|8|9][0-9]{9}$/; //验证规则
		if(!reg.test(mobile) || !reg.test(bank_mobile)) {
			layer.msg('手机号码格式不正确');
			return;
		}
		
		$.ajax({
			type: "post",
			url: "<?php echo url('index/member/renzhen'); ?>",
			data: $('#my_form').serialize(), //表单数据
			success: function(data) {
				layer.msg(data.msg,function(){
					location.href ='index.html';
				});
			}
		});
	}

	$('#rel_name').bind("keup input", function() {
		$('#bank_username').val($(this).val());
	})

	//图片上传
	layui.use(['form', 'upload'], function() {
		var $ = layui.jquery,
			upload = layui.upload,
			form = layui.form;

		//监听表单提交
		form.on('submit(submit_form)', function(data) {
			set_content();
			return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
		});

		/************上传图片*************/
		var uploadInst_1 = upload.render({
			elem: '#upload_1',
			auto: false //选择文件后不自动上传
				,
			choose: function(obj) {
				//将每次选择的文件追加到文件队列
				var files = obj.pushFile();
				//预读本地文件，如果是多文件，则会遍历。(不支持ie8/9)
				obj.preview(function(index, file, result) {
					$('#img_1').attr('src', result); //图片链接（base64）
					var sendData = result.substring(result.indexOf(";base64,") + 8);
					$.post("<?php echo url('index/member/upload'); ?>", {
						value: sendData
					}, function(data) {
						if(data.code == '200') {
							$('#thumb_1').val(data.url);
						} else {
							layer.msg(data.msg);
						}
					});
				});
			},
			url: "<?php echo url('index/member/upload'); ?>",
			accept: 'images'
		});

		var uploadInst_1 = upload.render({
			elem: '#upload_2',
			auto: false //选择文件后不自动上传
				,
			choose: function(obj) {
				//将每次选择的文件追加到文件队列
				var files = obj.pushFile();
				//预读本地文件，如果是多文件，则会遍历。(不支持ie8/9)
				obj.preview(function(index, file, result) {
					$('#img_2').attr('src', result); //图片链接（base64）
					var sendData = result.substring(result.indexOf(";base64,") + 8);
					$.post("<?php echo url('index/member/upload'); ?>", {
						value: sendData
					}, function(data) {
						if(data.code == '200') {
							$('#thumb_2').val(data.url);
						} else {
							layer.msg(data.msg);
						}
					});
				});
			},
			url: "<?php echo url('index/member/upload'); ?>",
			accept: 'images'
		});

		var uploadInst_1 = upload.render({
			elem: '#upload_3',
			auto: false //选择文件后不自动上传
				,
			choose: function(obj) {
				//将每次选择的文件追加到文件队列
				var files = obj.pushFile();
				//预读本地文件，如果是多文件，则会遍历。(不支持ie8/9)
				obj.preview(function(index, file, result) {
					$('#img_3').attr('src', result); //图片链接（base64）
					var sendData = result.substring(result.indexOf(";base64,") + 8);
					$.post("<?php echo url('index/member/upload'); ?>", {
						value: sendData
					}, function(data) {
						if(data.code == '200') {
							$('#thumb_3').val(data.url);
						} else {
							layer.msg(data.msg);
						}
					});
				});
			},
			url: "<?php echo url('index/member/upload'); ?>",
			accept: 'images'
		});

		var uploadInst_1 = upload.render({
			elem: '#upload_4',
			auto: false //选择文件后不自动上传
				,
			choose: function(obj) {
				//将每次选择的文件追加到文件队列
				var files = obj.pushFile();
				//预读本地文件，如果是多文件，则会遍历。(不支持ie8/9)
				obj.preview(function(index, file, result) {
					$('#img_4').attr('src', result); //图片链接（base64）
					var sendData = result.substring(result.indexOf(";base64,") + 8);
					$.post("<?php echo url('index/member/upload'); ?>", {
						value: sendData
					}, function(data) {
						if(data.code == '200') {
							$('#thumb_4').val(data.url);
						} else {
							layer.msg(data.msg);
						}
					});
				});
			},
			url: "<?php echo url('index/member/upload'); ?>",
			accept: 'images'
		});
	})
</script>